<template>
  <h1>布局组件</h1>
  <el-row :gutter="10">
   <el-col :span="8" style="border: 5px solid #f00;">111</el-col>
   <el-col :span="8" style="border: 5px solid #0f0;">111</el-col>
   <el-col :span="8" style="border: 5px solid #000;">111</el-col>
  </el-row>

  <el-row :gutter="10">
    <el-col :span="12" ><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
    <el-col :span="12" ><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
  </el-row>

  <h3>六张图</h3>
  <el-row :gutter="10">
    <el-col :span="4" v-for="i in 6"><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
  </el-row>
  <h3>三张图 1：2：3</h3>
  <el-row :gutter="10">
    <el-col :span="4"><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
    <el-col :span="8"><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
    <el-col :span="12"><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
  </el-row>
  <h3>一共8列，每列显示数字1 2 3 ... 8</h3>
  <el-row :gutter="10">
    <el-col :span="3" v-for="i in 8">{{i}}</el-col>
  </el-row>

  <h3>列偏移</h3>
<!--  :offset="0" 默认考靠左不偏移，写几就向右移动几个-->
  <el-row >
   <el-col :span="20" :offset="4"><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
  </el-row>

  <h3>列嵌套</h3>
  <el-row>
    <el-col :span="12" style="border: 5px solid magenta;">1111</el-col>
    <el-col :span="12" style="border: 5px solid maroon;">
<!--      嵌套时，一定要把当前元素再重新看作是一个新的el-row，还是24分，在进行分配！-->
      <el-row>
        <el-col :span="8" style="border: 5px solid blue;">111</el-col>
        <el-col :span="8" style="border: 5px solid gold;">111</el-col>
        <el-col :span="8" style="border: 5px solid blue;">111</el-col>
      </el-row>
    </el-col>
  </el-row>

  <hr>
<!--  页面顶部是一个二级标题“我的主页”-->
<!--  第二部分是两列布局，左右比例1:2，有间隔-->
<!--  右侧区域内包含三张图片，每张图片平均分配宽度并排显示-->
  <h2>我的主页</h2>
  <el-row :gutter="10">
    <el-col :span="8" >
      <el-menu>
        <el-menu-item index="1">111</el-menu-item>
        <el-menu-item index="2">222</el-menu-item>
        <el-menu-item index="3">333</el-menu-item>
      </el-menu>
    </el-col>
    <el-col :span="16">
      <el-row>
        <el-col :span="8"><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
        <el-col :span="8"><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
        <el-col :span="8"><img src="imgs/rich.jpg" style="width: 100%;"></el-col>
      </el-row>
    </el-col>
  </el-row>
</template>

<script setup>

</script>

<style scoped>

</style>